package com.example.springboottx.service;

import com.example.springboottx.bean.Book;
import com.example.springboottx.mapper.BookMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BookServiceImpl implements BookService{

    @Autowired
    private BookMapper bookMapper;

    @Override
    public List<Book> findAllBooks() {
        return bookMapper.findAllBooks();
    }

    @Override
    public Book findBookById(Integer id) {
        return bookMapper.findBookById(id);
    }
}
